﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using Microsoft.MediaCenter.Guide;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Messaging;

namespace MoreEPG.Model
{
    public class GuideChannelInfo : ViewModelBase
    {


        
        public long Id { get; set; }
        public string ServiceInfo { get; set; }
        public Service service { get; set; }
        public Channel channel { get; set; }
        public string Type { get; set; }
        public bool isAdded { get; set; }

        
        public const string NamePropertyName = "Name";
        private string _NamemyProperty = "";
        public string Name
        {
            get
            {
                return _NamemyProperty;
            }

            set
            {
                if (_NamemyProperty == value)
                {
                    return;
                }

               
                _NamemyProperty = value;

                Messenger.Default.Send(true);

                // Update bindings, no broadcast
                RaisePropertyChanged(NamePropertyName);

               
            }
        }

        public const string ChannelNumPropertyName = "ChannelNum";
        private int channelNum;
        public int ChannelNum
        {
            get
            {
                return channelNum;
            }
            set
            {
                if (channelNum == value)
                {
                    return;
                }
                Messenger.Default.Send(true);
                channelNum = value;
                RaisePropertyChanged(ChannelNumPropertyName);
            }
        }

       
        public const string ChannelIsDissabledPropertyName = "ChannelIsDissabled";
        private bool _ChannelIsDissabled = false;
        public bool ChannelIsDissabled
        {
            get
            {
                return _ChannelIsDissabled;
            }

            set
            {
                if (_ChannelIsDissabled == value)
                {
                    return;
                }

                Messenger.Default.Send(true);
                _ChannelIsDissabled = value;

                // Update bindings, no broadcast
                RaisePropertyChanged(ChannelIsDissabledPropertyName);

                
            }
        }

       
        public const string disableInbandPropertyName = "disableInband";
        private bool _disableInband = false;
        public bool disableInband
        {
            get
            {
                return _disableInband;
            }

            set
            {
                if (_disableInband == value)
                {
                    return;
                }
                Messenger.Default.Send(true);
                _disableInband = value;

                // Update bindings, no broadcast
                RaisePropertyChanged(disableInbandPropertyName);
            }
        }
    }
}
